Skip to content

Add test for rolling pool update with VM availability check on updated host - #625

Open
DatBewar wants to merge 6 commits into
masterfrom
ecr/feat-storage-linstor-619
Open

Add test for rolling pool update with VM availability check on updated host#625
DatBewar wants to merge 6 commits into
masterfrom
ecr/feat-storage-linstor-619

Conversation

@DatBewar

@DatBewar DatBewar commented Jul 7, 2026

Copy link
Copy Markdown

New pr based on #310

Added test_linstor_sr_pool_update for rolling pool update with VM availability check.

It performs

    A rolling update and reboot of all hosts in a LINSTOR SR pool (starting with the master).
    Verifies VM can start and shutdown successfully on each host after update.
    Ensures SR remains usable throughout the process.

@DatBewar
DatBewar force-pushed the ecr/feat-storage-linstor-619 branch 2 times, most recently from df76049 to 2d17a45 Compare July 8, 2026 07:40
@DatBewar
DatBewar force-pushed the ecr/feat-storage-linstor-619 branch 3 times, most recently from ce0785b to 6db10aa Compare July 22, 2026 08:37
@DatBewar
DatBewar marked this pull request as ready for review July 23, 2026 06:55
@DatBewar
DatBewar requested review from a team as code owners July 23, 2026 06:55
@DatBewar DatBewar changed the title Ecr/feat storage linstor 619 Add test for rolling pool update with VM availability check on updated host - Ecr/feat storage linstor 619 Jul 27, 2026
Comment thread lib/host.py Outdated
Comment thread tests/storage/linstor/conftest.py Outdated
@DatBewar
DatBewar force-pushed the ecr/feat-storage-linstor-619 branch from 6db10aa to 1624439 Compare August 11, 2026 10:15
@DatBewar DatBewar changed the title Add test for rolling pool update with VM availability check on updated host - Ecr/feat storage linstor 619 Add test for rolling pool update with VM availability check on updated host Aug 11, 2026
@DatBewar
DatBewar requested a review from glehmann August 11, 2026 10:16

@Ythogtha Ythogtha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels the way I'd be doing it manually for storage, so I'm ok with this test.

Comment thread tests/storage/linstor/conftest.py Outdated
Comment thread tests/storage/linstor/test_linstor_sr.py Outdated
Comment thread pytest.ini Outdated
rushikeshjadhav and others added 6 commits August 20, 2026 15:54
… from testing repo

Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
…po in pool_with_linstor

This mechanism allows the test to start with our without testing repo packages

Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
Tests that want to test linstor upgrade can enablerepo during execution

Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
…ity check.

- Uses `@pytest.mark.upgrade_test` to mark need of upgrade during the test
- Updates of all hosts in a LINSTOR SR pool (starting with the master)
- Reboots updated hosts
- Verifies VM can start and shutdown successfully on each host after update
- Ensures SR remains usable throughout the process

Signed-off-by: Rushikesh Jadhav <rushikesh7@gmail.com>
…date`

Signed-off-by: Erwan Croze <erwan.croze@vates.tech>
Use new function `yum_update` instead of redundant function added
previously, also fix name of function to be more accurate on what's it
does

Signed-off-by: Erwan Croze <erwan.croze@vates.tech>
@DatBewar
DatBewar force-pushed the ecr/feat-storage-linstor-619 branch from 1624439 to d5946aa Compare August 20, 2026 13:54
@DatBewar
DatBewar requested a review from glehmann August 20, 2026 13:56

@stormi stormi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full history should be squashed before approval, IMO, to avoid merging it as is. I know that it was initially started by Rishi, but the code changed so much since that I don't think it's necessary to keep the history. We don't want PRs that do things then undo them. I would at least expect reviewers to say something about it.

But my biggest concern here is that I don't see how this test can produce any other result than "No updates available for host". The fixture installs linstor from xcp-ng-linstor-testing, then we try to update from xcp-ng-linstor-testing. Or am I missing something?

In my opinion, this PR started with an implementation when it should have started with a design. Then we asked @DatBewar to fix it but should have stepped back instead, and designed it first.

The core of the test is probably fine. But update tests depend on the setup and here that's the main obstacle. We must ENSURE that there will be updates to test. We must even make sure we know which updates we're actually testing.

Discussions on the design, involving the platform team, would have also shown that testing updates is a vast topic, that raises logistical questions as it depends entirely on the initial state of the pool that we're testing. And is really useful if we make it a rolling pool update with VMs running.

My proposition for what's next is: a call, with the relevant people from storage team and platform team.

Now, maybe I missed something obvious and the test is actually useful the way it's been approved, don't hesitate to tell me.

CC @glehmann

Comment on lines 113 to 122
hostA2: Host,
lvm_disks: None,
pool_with_saved_yum_state: Pool,
_linstor_config: LinstorConfig
_linstor_config: LinstorConfig,
) -> Generator[Pool, None, None]:
import concurrent.futures

pool = pool_with_saved_yum_state

def ensure_linstor_not_installed(host: Host) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be directly related to this PR. Should at list be in a dedicated commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants